package com.write.ibatis.config;

import java.util.HashMap;
import java.util.Map;

public class Configuration {
    private JdbcProperties jdbcProperties;
    private Map<String,MapperStatement> mapperMap=new HashMap<>();

    public JdbcProperties getJdbcProperties() {
        return jdbcProperties;
    }

    public void setJdbcProperties(JdbcProperties jdbcProperties) {
        this.jdbcProperties = jdbcProperties;
    }

    public Map<String, MapperStatement> getMapperMap() {
        return mapperMap;
    }

    public void setMapperMap(Map<String, MapperStatement> mapperMap) {
        this.mapperMap = mapperMap;
    }

    public void addMapperStatement(MapperStatement mapperStatement){
        this.mapperMap.put(mapperStatement.getId(),mapperStatement);
    }

    public MapperStatement getMapperStatement(String mapperStatement){
        return  this.mapperMap.get(mapperStatement);
    }
}
